<template>
  <div class="message" >
    <nav>
      <div class="box">
        <van-icon name="arrow-left" class="icon icon-left"  @click="goBack"/>
        <span>消息中心</span>
      </div>
    </nav>
    <div class="sustomer 01">
      <div class="left">
        <img src="https://mall.leyifan.com/static/h5/new_images/customerService.png" alt="" />
      </div>
      <div class="right">
        <div class="text">
          <span style="font-size: 13rem">联系客服</span>
          <span style="font-size: 11rem; color: #aaa">联系线上客服，查看沟通记录</span>
        </div>
      </div>
      <div class="icos">
        <van-icon name="arrow" />
      </div>
    </div>
    <div class="run"></div>
    <div class="sustomer 02" @click="gotonotice">
      <div class="left">
        <img src="https://mall.leyifan.com/static/h5/new_images/news_notice.png" alt="" />
      </div>
      <div class="right">
        <div class="text">
          <span style="font-size: 13rem" >公告信息</span>
          <span style="font-size: 11rem; color: #aaa">优惠双十二 折扣无止尽</span>
        </div>
      </div>
      <div class="icos">
        <van-icon name="arrow" />
      </div>
    </div>
    <div class="sustomer 03" @click="gotoorder">
      <div class="left">
        <img src="https://mall.leyifan.com/static/h5/new_images/news_order.png" alt="" />
      </div>
      <div class="right">
        <div class="text">
          <span style="font-size: 13rem">订单消息</span>
          <span style="font-size: 11rem; color: #aaa">暂无消息</span>
        </div>
      </div>
      <div class="icos">
        <van-icon name="arrow" />
      </div>
    </div>
    <div class="sustomer 04" @click='gotoservice'>
      <div class="left">
        <img src="https://mall.leyifan.com/static/h5/new_images/news_service.png" alt="" />
      </div>
      <div class="right">
        <div class="text">
          <span style="font-size: 13rem">服务消息</span>
          <span style="font-size: 11rem; color: #aaa">暂无消息</span>
        </div>
      </div>
      <div class="icos">
        <van-icon name="arrow" />
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
// 钩子函数获取路由实例
const router = useRouter()
const gotonotice = () => {
  router.push({ path: "/hlfnotice" });
}
const gotoorder = () => {
  router.push({ path: "/hlforder" });
}
const gotoservice = () => {
  router.push({ path: "/hlfservice" });
}
const goBack = () => {
  router.push('/')
}
</script>

<style lang="less" scoped>
.message {
  width: 100vw;
  height: 100vh;
  background-color: #fff;
  padding: 40rem 0;
  .run {
    height: 10rem;
    background: #f5f5f5;
  }
  nav {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;

    .box {
      width: 100vw;
      height: 40rem;
      background-color: #fff;
      font-size: 18rem;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      .icon-left {
        position: absolute;
        top: 12rem;
        left: 14rem;
      }
      span {
        line-height: 40rem;
        font-size: 16rem;
        font-weight: bold;
      }
    }
  }
  .sustomer {
    display: flex;
    justify-content: space-start;
    align-items: center;
    position: relative;
    padding: 10rem 0;
    .left {
      padding-left: 20rem;
      img {
        width: 50rem;
        height: 50rem;
      }
    }
    .right {
      display: flex;
      align-items: center;
      justify-content: space-between;
      // position: relative;
      .text {
        display: flex;
        flex-direction: column;
        padding-left: 10rem;
      }
    }
    .icos {
      font-size: 10rem;
      // padding-left: 110rem;
      color: #ccc;
      position: absolute;
      // top: 50%;
      right: 16rem;
    }
  }
}
</style>